import time, os
from time import sleep
import subprocess
from common.loger_handler import mylog
from page_element.key import PageKey


class page_set3(PageKey):
    """图传设置"""

    def set_003_001(self, xdz):
        """信道设置"""
        self.iv_zorroRealcontrol_set.click()
        self.set_3.click()
        ov_switch_img_channel = self.driver(resourceId="com.gdu.pro2:id/ov_switch_img_channel")
        ov_switch_img_channel.click()
        self.driver.xpath(F'//*[@text="{xdz}"]').click()
        time.sleep(1)
        self.driver.press("back")
        time.sleep(2)
        msg = self.driver(resourceId="com.gdu.pro2:id/tv_arlink").get_text()
        masgi_list = msg.split(",")
        xdtext = masgi_list[0][-8:]
        mylog.info(F"-------{xdz}-------{xdtext}")






